<template>
  <div>
    <div class="header-title">
      <div class="point"></div>
      <p class="title">{{ $t('hot_topics') }}</p>
    </div>
    <div class="list">
      <div
        v-for="(item, index) in list"
        :key="index"
        class="item cursor-pointer click"
      >
        <mx-link :to="`/m/topic/${item.subjectId}`">
          <div class="item-flex">
            <div>
              <p class="item-title ov-1">
                {{ item.subjectName }}
              </p>
              <p class="num">{{ item.contentCount }} {{ $t('xxx_content') }}</p>
            </div>
            <icon size="16px" name="ic_arrow_right_light" />
          </div>
        </mx-link>
      </div>
    </div>
  </div>
</template>

<script>
import MxLink from './MxLink.vue';

export default {
  components: { MxLink },

  props: {
    list: {
      type: Array,
      default: () => []
    }
  }
};
</script>

<style lang="scss" scoped>
.header-title {
  height: 24px;
  display: flex;
  align-items: center;
  .point {
    width: 4px;
    height: 16px;
    margin: 0 8px 0 16px;
    background: #fa4646;
    border-radius: 2px;
  }
}
.item {
  width: 344px;
  height: 64px;
  background: rgba(12, 12, 28, 0);
  border-radius: 8px;
  padding: 12px 16px;

  .item-title {
    width: 290px;
    font-size: 16px;
    color: #0c0c1c;
    line-height: 22px;
    font-weight: 500;
    margin-bottom: 2px;
  }

  .num {
    font-size: 12px;
    color: rgba(12, 12, 28, 0.7);
    line-height: 16px;
    font-weight: 400;
  }
}

.item-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
</style>
